import http from "../../utils/request.js";

// 获取用户列表
export function getAlls(paramObj) {
	return http.$post('qmFollow/getUserList',{
		user_city_val: paramObj.city,
		price_start_val: paramObj.priceStart,
		price_end_val: paramObj.priceEnd,
		age_start_val: paramObj.ageStart,
		age_end_val: paramObj.ageEnd,
		isMutualFollow1: '1',
		currentPage: paramObj.currentPage,
		showCount: paramObj.showCount
	});
}

// 获取推荐团队列表
export function getTeamRankList({
	showCount,
	currentPage,
}) {
  return http.$post('team/getTeamRankList',{
	  showCount,
	  currentPage,
  })
}

// 获取用户信息
export function getUserInfo(id, userType) {
	return http.$get('qiMiao/getOhterUserInfo', {
		obj_userId: id,
		user_type: userType
	});
}

 

// 访问量
export function addBrowses(paramObj) {
	return http.$post('qiMiao/addBrowses',  {
		userId: paramObj.userId
	})
}

// 获取评价列表
export function getUserComments(paramObj) {
	return http.$get('splidComment/getMyCommentList', {
		is_need_label: '1',
		type: '3',
		currentPage: paramObj.currentPage,
		showCount: paramObj.showCount,
		obj_userId: paramObj.userId
	});
}


// 获取用户的档期
export function getScheduleInfo(id) {
	return http.$get('schedule/getScheduleInfo', {
		obj_userId: id
	});
}

// 获取用户的作品列表
export function getCaseList(id) {
	return  http.$get('qiMiao/getCaseList', {
		obj_userId: id
	});
}

// 获取作品详情
export function getCaseDetail(paramObj) {
	return  http.$get('qiMiao/getCase',{
		case_id: paramObj.caseId
	});
}

// 点赞
export function praise(paramObj) {
	return http.$post('qiMiao/saveLike',  {
		target_id: paramObj.target_id,
		user_type: paramObj.userType
	})
}
// 取消点赞
export function unpraise(paramObj) {
	return http.$post('qiMiao/removeLike',  {
		target_id: paramObj.target_id
	})
}
// 评论
export function saveComment(paramObj) {
	return http.$post('qiMiao/saveComment', {
		content: paramObj.content,
		target_id: paramObj.target_id,
		type: "1",
		user_type: paramObj.userType
	})
}

// 获取评论列表
export function getComments(paramObj) {
	return http.$post('qiMiao/getCommentList',  {
		currentPage: 1,
		showCount: 20,
		type: "1",
		target_id: paramObj.target_id
	})
}

export function getSheduleDetail(paramObj) {
	// return request('schedule/getScheduleData', 'GET', {
	// 	schedule_id: paramObj.schedule_id
  // });
  return http.$post('schedule/getScheduleData',  {
		schedule_id: paramObj.schedule_id
	})
}
// // 获取关注、粉丝列表
// export function getFansFlollows(paramObj) {
// 	return http.$post('qmFollow/getFollowList', 'GET', {
// 		query_type: paramObj.queryType, // 1: 关注列表 2：粉丝列表
// 		currentPage: paramObj.currentPage,
// 		showCount: paramObj.showCount,
// 	});
// }

// // 关注/取消关注
// export function toggleFollow(paramObj) {
// 	return http.$post('qmFollow/followUser', 'POST', {
// 		follow_userId: paramObj.userId
// 	});
// }

